gdk/wayland: Defer processing of globals closures
authorRobert Mader <robert.mader@posteo.de>
Sat, 27 Mar 2021 14:48:00 +0000 (15:48 +0100)
committerRobert Mader <robert.mader@posteo.de>
Tue, 30 Mar 2021 13:20:00 +0000 (15:20 +0200)
commit56d37ceed05bd77f18e332b5f1d1ee2732fe46da
tree57a7831b88cf562890e2b2ab3611d1b6ae195b15
parentb77e05ce375f60a7f470a9a11f2c22a27927a44e
gdk/wayland: Defer processing of globals closures

... until all globals have been received.

The dependency tracking introduced in 4e9be39518 only allows to
specify required globals and processes the closures as soon as
the requirements have been met. There are, however, also optional
dependencies - most notably the primary_selection protocol.
Currently we rely on the fact that compositors like Mutter announce
it before `wl_seat`, even though the order is not specified in
the spec.

Process globals closures only after all globals have been announced,
so optional dependencies can be accommodated.

Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/3791
gdk/wayland/gdkdisplay-wayland.c